|
In most Unix-like operating systems, the ps program (short for "process status") displays the currently-running processes. A related Unix utility named top provides a real-time view of the running processes.In Windows PowerShell, ps is a predefined command alias for the Get-Process cmdlet, which essentially serves the same purpose.==Examples== For example: # ps PID TTY TIME CMD 7431 pts/0 00:00:00 su 7434 pts/0 00:00:00 bash 18585 pts/0 00:00:00 ps Users can also utilize the ps command in conjunction with the grep command (see the pgrep and pkill commands) to find information about a single process, such as its id:$ # Trying to find the PID of `firefox-bin` which is 2701 $ ps -A | grep firefox-bin 2701 ? 22:16:04 firefox-bin The use of pgrep simplifies the syntax and avoids potential race conditions: $ pgrep -l firefox-bin 2701 firefox-bin To see every process running as root in user format: # ps -U root -u USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 1 0.0 0.0 9436 128 - ILs Sun00AM 0:00.12 /sbin/init -- 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Ps (Unix)」の詳細全文を読む スポンサード リンク
|